package com.itheima.advantagesup.entity;

import com.itheima.advantagesup.vo.RoleInfoVO;
import com.itheima.advantagesup.vo.RoleVO;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class SysRole {
    private String id;
    private String name;
    private String description;
    private LocalDateTime create_date;
    private LocalDateTime update_date;
    private String remarks;
    private char del_flag;
    private int superadmin;
    private String default_data;
    private int[] menuids;
    public RoleVO transformRoleVO(){
        RoleVO roleVO = new RoleVO();
        roleVO.setId(this.id);
        roleVO.setName(this.name);
        roleVO.setDescription(this.description);
        roleVO.setCreate_date(this.create_date);
        roleVO.setUpdate_date(this.update_date);
        roleVO.setRemarks(this.remarks);
        roleVO.setDel_flag(this.del_flag);
        roleVO.setSuperadmin(this.superadmin);
        roleVO.setDefault_data(this.default_data);
        //roleVO.setRole_id(this.id);
        return roleVO;
    }
    public RoleInfoVO transformRoleInfoVO(){
        RoleInfoVO roleInfoVO = new RoleInfoVO();
        roleInfoVO.setId(this.id);
        roleInfoVO.setName(this.name);
        roleInfoVO.setDescription(this.description);
        roleInfoVO.setCreate_date(this.create_date);
        roleInfoVO.setUpdate_date(this.update_date);
        roleInfoVO.setRemarks(this.remarks);
        roleInfoVO.setDel_flag(this.del_flag);
        roleInfoVO.setSuperadmin(this.superadmin);
        roleInfoVO.setDefault_data(this.default_data);
        //roleInfoVO.setAuthList();
        return roleInfoVO;
    }
}
